#ifndef POSITION_CONTROL_LOOP_H
#define POSITION_CONTROL_LOOP_H

#include "../ControlLoop.h"

class PositionControlLoop : public ControlLoop {
private:
    float lastPositionError;
    float positionKd;

public:
    PositionControlLoop(float kp, float ki, float kd, float integralLimit, float outputLimit, float dcBusVoltage = 12.0f);

    // 重写execute方法，添加微分控制
    void execute(float angle) override;
};

#endif // POSITION_CONTROL_LOOP_H